home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 4 / FM Towns Free Software Collection 4 - Disc 1.iso / msdos / cache / source / cdev.asm < prev    next >
Encoding:
Assembly Source File  |  1991-10-19  |  1.1 KB  |  73 lines

  1.  
  2. _TEXT        SEGMENT  DWORD PUBLIC 'CODE'
  3. _TEXT        ENDS
  4. _DATA        SEGMENT  WORD PUBLIC 'DATA'
  5. _DATA        ENDS
  6. CONST        SEGMENT  WORD PUBLIC 'CONST'
  7. CONST        ENDS
  8. _BSS        SEGMENT  WORD PUBLIC 'BSS'
  9. _BSS        ENDS
  10. DGROUP        GROUP    CONST,    _BSS,    _DATA
  11.  
  12.         ASSUME  CS: _TEXT, DS: DGROUP, SS: DGROUP, ES: DGROUP
  13.  
  14. dev_hed        struc
  15. dev_next    dd    0
  16. dev_sts        dw    0
  17. str_ent        dw    0
  18. int_ent        dw    0
  19. res        db    8 dup (0)
  20. dev_hed        ends
  21.  
  22. DEV_HED_SIZ    equ    size dev_hed
  23.  
  24. _TEXT        SEGMENT
  25.  
  26.         public    _Dev_str_call
  27. _Dev_str_call    proc    near
  28.         push    bp
  29.         mov    bp,sp
  30.         les    bx,[bp+4+4]
  31.         call    dword ptr ss:[bp+4]
  32.         pop    bp
  33.         ret
  34. _Dev_str_call    endp
  35.  
  36.         public    _Dev_int_call
  37. _Dev_int_call    proc    near
  38.         push    bp
  39.         mov    bp,sp
  40.         call    dword ptr ss:[bp+4]
  41.         pop    bp
  42.         ret
  43. _Dev_int_call    endp
  44.  
  45.         public    _get_DPB
  46. _get_DPB    proc    near
  47.         push    bp
  48.         mov    bp,sp
  49.         push    bx
  50.         push    ds
  51.  
  52.         mov    ah,32h
  53.         mov    dl,[bp+4]
  54.         inc    dl
  55.         int    21h
  56.         jnc    _get_DPB2
  57.  
  58.         mov    ax,0FFFFh
  59.         mov    dx,ax
  60.         jmp    _get_DPB3
  61.  
  62. _get_DPB2:    mov    ax,bx
  63.         mov    dx,ds
  64.  
  65. _get_DPB3:    pop    ds
  66.         pop    bx
  67.         pop    bp
  68.         ret
  69. _get_DPB    endp
  70.  
  71. _TEXT        ENDS
  72.         END
  73.